Contents for TFileMgrDropEdit and TFileMgrDropMemo
Contents for TFileMgrDropEdit and TFileMgrDropMemo Components

The TFileMgrDropEdit and TFileMgrDropMemo components provide easy to program drag and drop integration with the Windows File Manager.  The following sections provide detailed descriptions of the components.

Overview

Properties

Events


Overview of TFileMgrDropEdit and TFileMgrDropMemo
Overview

The TFileMgrDropEdit and TFileMgrDropMemo components provide a convenient way for you to add Windows File Manager drag and drop capability to your application.

TFileMgrDropEdit extends the functionality of the standard TEdit component that ships with Delphi.  By using the TFileMgrDropEdit component, you give the user the ability to drag a file name from the File Manager and drop it on top of the TFileMgrDropEdit component.  Your application is notified by way of the OnDropFiles event that a user has dropped one or more files onto the component.  You can either choose to process the drop information yourself by examining various property values of the component, or you can have the component perform automatic processing of the event for you.

Automatic processing performed by the component includes automatically filling the entry field with the file names upon drop and automatically clearing the field of all contents before filling upon drop.

Similarly, the TFileMgrDropMemo component extends the functionality of the TMemo component that ships with Delphi.  TFileMgrDropMemo accepts file drops from the file manager, but places the file names into the memo one file name per line.  TFileMgrDropMemo also includes the same automatic processing available with the TFileMgrDropEdit component.

Properties

Events

Contents


Properties of TFileMgrDropEdit and TFileMgrDropMemo
TFileMgrDropEdit and TFileMgrDropMemo Properties

These controls include all of the properties, events and methods of the TEdit and TMemo control and include these additional properties:

AutoClear

AutoFill

AcceptFiles

DroppedFiles

NumberDropped

Contents


Events of TFileMgrDropEdit and TFileMgrDropMemo
TFileMgrDropEdit and TFileMgrDropMemo Events

These controls add the following events to the existing events from the TEdit and TMemo controls:

OnFileDropContents


AutoClear Property

Use the AutoClear property to tell the component whether or not the text associated with the control should be cleared before inserting the name of the file(s) into the control.  A value of TRUE indicates the control text should be cleared, whereas a value of FALSE indicates the control should not be cleared and that the file name(s) should simply be concatenated to the existing text content.

Contents


AutoFill Property

Use the AutoFill property to specify whether the component should automatically fill the text of the control with the name of the file(s) being dropped.  A value of  TRUE indicates the component should automatically fill the field, whereas a value of FALSE indicates it should not automatically fill the field with the dropped file names.

If AutoFill is FALSE, you may choose to handle the dropping of files on the control by handling the OnFileDrop event.

If AutoFill is TRUE, the control will automatically fill in the name(s) of the file(s) dropped into the text of the control.  For TFileMgrDropEdit, more than one file name are separated by semi-colons (;).  For TFileMgrDropMemo, the files names are inserted as lines in the control.

Contents


AcceptFiles Property

A Boolean indicating whether or not the control should accept file drops from the file manager.  When set to TRUE, the control accepts drops from the file manager.  When FALSE, the control does not accept file drops.

Contents


NumberDropped Property

An integer reflecting the number of files dropped on the control.  Use the DroppedFiles property to retrieve the names of the files dropped.

Contents


DroppedFiles Property

A TStringList containing one entry per name of a file dropped.  Use the NumberDropped property to determine the number of files dropped on the control.

Contents


OnFileDrop Event

The OnFileDrop event is a TNotifyEvent signaled by the control after a file has been dropped on it.  This event is signaled in response to the receipt of a WM_DROPFILES message by the control.  You can use the DroppedFiles and NumberDropped properties to determine the number of files that have been dropped on the control during the processing of this event.

Contents